Public Sub EnumerateForms(bolExtract As Boolean, strFormality As String)

   Dim db As Database
   Dim recFormal As Recordset
   Dim objAO As AccessObject
   Dim objCP As Object
   
   ' Open the database and font style recordset
   Set db = CurrentDb()
   Set recFormal = db.OpenRecordset(Formality_Table)
   recFormal.Index = "PrimaryKey"
   
   'Enumerate the forms
   Set objCP = Application.CurrentProject
   If bolExtract Then
      For Each objAO In objCP.AllForms
         ExtractCaptions recFormal, strFormality, objAO.Name
      Next objAO
   Else
     For Each objAO In objCP.AllForms
         SetCaptions recFormal, strFormality, objAO.Name
     Next objAO
   End If
   
   ' Clean up after yourself
   recFormal.Close
   
End Sub
